﻿package mortal.game.proxy
{
    import Message.Game.*;
    import Message.Public.*;
    import mortal.game.cache.*;
    import mortal.game.manager.*;
    import mortal.game.scene3D.map3D.util.*;
    import mortal.mvc.core.*;

    public class ChatProxy extends Proxy
    {

        public function ChatProxy()
        {
            return;
        }// end function

        public function SendMessage(param1:int, param2:String, param3:uint = 0, param4:Array = null, param5:Array = null, param6:Array = null, param7:Boolean = false) : void
        {
            var _loc_11:SProxyInfo = null;
            var _loc_12:Object = null;
            var _loc_8:* = new SChatMsg();
            _loc_8.chatType = param1;
            _loc_8.content = param2;
            _loc_8.font = param3;
            _loc_8.isSys = param7;
            _loc_8.toEntityId = new SEntityId();
            _loc_8.chatDt = ClockManager.instance.nowDate;
            var _loc_9:* = new SMiniPlayer();
            _loc_9.entityId = new SEntityId();
            _loc_8.fromPlayer = _loc_9;
            var _loc_10:* = Cache.instance.platform.qqPlatJs;
            if (_loc_10)
            {
                _loc_8.jsStr = _loc_10;
            }
            else if (Cache.instance.platform.proxyVipInfo)
            {
                _loc_11 = Cache.instance.platform.proxyVipInfo;
                _loc_12 = new Object();
                _loc_12.proxyLv = _loc_11.proxyLv;
                _loc_12.proxyExtend = _loc_11.proxyExtend;
                _loc_12.proxyExtend2 = _loc_11.proxyExtend2;
                _loc_8.jsStr = JSON.stringify(_loc_12);
            }
            if (GameMapUtil.isForceChatMap)
            {
                _loc_8.force = cache.role.entityInfo.force;
            }
            if (param4)
            {
                _loc_8.items = param4;
            }
            if (param5)
            {
                _loc_8.pets = param5;
            }
            rmi.iInterPrx.chat_async(new AMI_IInter_chat(), _loc_8);
            return;
        }// end function

        public function SendMessageByStruct(param1:SChatMsg) : void
        {
            rmi.iInterPrx.chat_async(new AMI_IInter_chat(), param1);
            return;
        }// end function

        public function lookupRequest(param1:int, param2:SEntityId, param3:int) : void
        {
            rmi.iInterPrx.lookupRequest_async(new AMI_IInter_lookupRequest(), param1, param2, ELookUpType.convert(param3));
            return;
        }// end function

    }
}
